/**
 * Copyright (c) 2022 Beijing Jiaotong University
 * PhotLab is licensed under [Open Source License].
 * You can use this software according to the terms and conditions of the [Open Source License].
 * You may obtain a copy of [Open Source License] at: [https://open.source.license/]
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 *
 * See the [Open Source License] for more details.
 *
 * Author: Zhenjie Wei
 * Created: Apr. 12, 2023
 * Supported by: National Key Research and Development Program of China
 */
import { ipcRenderer, app } from "electron"
import PhotClient from "@photlab/phot-client/src/index"
import Store from "electron-store"
const store = new Store()
// console.log(store)
// store.clear()
// const settingStr = store.get('_setting') as string
const setting = ipcRenderer.sendSync('setDefaultStore')

console.log(setting)
const photClient = new PhotClient([setting.server.ip, setting.server.port])

const engineService = photClient.engineService
const libraryService = photClient.libraryService
const graphService = photClient.graphService
const projectService = photClient.projectService
const remoteService = photClient.remoteService
const deviceService = photClient.deviceService
const mainService = photClient.mainService

export { engineService, libraryService, graphService, projectService, remoteService, deviceService, mainService }
